package com.itheima;
/*
[ArrayList, LinkedList, HashSet, TreeSet, HashMap, TreeMap ]
 */
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;

public class Demo1 {
    public static void main(String[] args) {

        Collection<String> list = new ArrayList<>();

        list.add("ArrayList");
        list.add("LinkedList");
        list.add("HashSet");
        list.add("TreeSet");

        Iterator<String> it = list.iterator();
        String next = it.next();

        System.out.println(list);
    }
}
